package com.entrogy.dao;

import com.alibaba.fastjson.JSONObject;
import com.entrogy.bean.UserEntity;
import com.entrogy.bean.VisitorPassRecord;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName UtilsMapper
 * @Description
 * @Author luoxingjiang
 * @Date 2019/10/9 0009 下午 3:53
 * @Version 1.0
 **/
@Repository
public interface UtilsMapper {

    List<String> listCourseNameByExcel(Integer schoolCode);

    int insertStaticCourse(@Param("schoolCode") Integer schoolCode, @Param("staticCourseList") List<String> staticCourseList);

    /**
     * 查询同名学生
     * @param schoolCode
     * @return
     */
    List<JSONObject> listMultipleNameStudent(@Param("schoolCode") Integer schoolCode);

    List<JSONObject> listGroup(@Param("schoolCode") Integer schoolCode);

    List<String> listUserName(@Param("userIdString") String userIdString);

    int updateGroup(@Param("groupUserName") String groupUserName, @Param("size") int size, @Param("groupId") Integer groupId);

    List<UserEntity> listSchoolTeacher(@Param(value = "schoolCode") Integer schoolCode, @Param(value = "gradeId") Integer gradeId, @Param(value = "classId") Integer classId, @Param(value = "teacherIds") String[] teacherIds, @Param("teacherName") String teacherName);

    /**
     * 插入访客流水记录
     * @param records
     * @return
     */
    int insertVisitorPassRecord(@Param("records") List<VisitorPassRecord> records);

    /**
     * 查询三原考试信息
     * @return
     */
    List<JSONObject> listSanYuanExam();

    /**
     * 根据表名查询某次考试的所有信息
     * @param tableName
     * @return
     */
    List<JSONObject> listScore(@Param("tableName") String tableName);
}
